#include "../include/head.h"

int init_pthread_data(pthread_data_t *pthread_data, int pthread_num)
{
    // 第一个参数必须是指针 传入传出！
    pthread_data->workernum = pthread_num;
    // 申请存储各个tid的数组空间
    pthread_data->ptidarr = (pthread_t *)calloc(pthread_num, sizeof(pthread_t));
    if(pthread_data->ptidarr ==NULL)
    {
        return -1;
    }
    return 0;
}
